Storage arrays and other computerized equipment often permit the assignment of quotas to limit the amount of data that can be stored for particular users or groups. Such quotas can be applied to entire directory trees, i.e., structures of files and sub-directories. Quotas assigned to directory trees are known as “quota trees.” Quota trees can be created for any number of directory trees of a file system. For each quota tree, an administrator generally establishes a soft limit, i.e., an amount of consumed storage space beyond which a warning to users is generated, and a hard limit, i.e., an amount of consumed storage space beyond which additional storage requests are denied.
Information pertaining to quota trees of a file system is typically stored in a quota tree database. The quota tree database includes, for each quota tree, the soft limit, the hard limit, and a usage metric. The usage metric is updated as needed to reflect the actual amount of data stored in the directory tree to which the quota tree is assigned. The usage metric is expressed either as an aggregated file size (e.g., in bytes) or as a block count, where each block corresponds to a unit of disk storage, such as 1 KB.
Records in the quota tree database can sometimes become corrupted, such that they no longer reflect actual data usage. When an administrator suspects corruption of a record of a particular quota tree, or at any desired time, the administrator can issue a quota check command, e.g., from a command line interface (CLI) on an administrative computer, to initiate a quota check task on the suspected quota tree. The quota check task scans the directory tree to which the quota tree is assigned, calculates actual usage, and compares the result with the usage metric stored in the quota tree database. If the calculated value differs from the stored value, the quota check task updates the record of the quota tree database to reflect the calculated value.